//public class mysql {
//}
//
//
//Enter password: *********
//Welcome to the MySQL monitor.  Commands end with ; or \g.
//Your MySQL connection id is 8
//Server version: 8.0.39 MySQL Community Server - GPL
//
//Copyright (c) 2000, 2024, Oracle and/or its affiliates.
//
//Oracle is a registered trademark of Oracle Corporation and/or its
//affiliates. Other names may be trademarks of their respective
//owners.
//
//        Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
//
//mysql> use java113;
//Database changed
//mysql> show table;
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
//mysql> show tables;
//+-------------------+
//        | Tables_in_java113 |
//        +-------------------+
//        | class             |
//        | course            |
//        | emp               |
//        | score             |
//        | stu2              |
//        | student           |
//        +-------------------+
//        6 rows in set (0.01 sec)
//
//mysql> select * from class;
//+----------+-------------------------+
//        | class_id | name                    |
//        +----------+-------------------------+
//        |        1 | 计算机系2019级1班       |
//        |        2 | 中文系2019级3班         |
//        |        3 | 自动化2019级5班         |
//        +----------+-------------------------+
//        3 rows in set (0.01 sec)
//
//mysql> select * from course;
//+-----------+--------------------+
//        | course_id | name               |
//        +-----------+--------------------+
//        |         1 | Java               |
//        |         2 | 中国传统文化       |
//        |         3 | 计算机原理         |
//        |         4 | 语文               |
//        |         5 | 高阶数学           |
//        |         6 | 英文               |
//        +-----------+--------------------+
//        6 rows in set (0.00 sec)
//
//mysql> select * from student;
//+------------+-------+-----------------+------------------+----------+
//        | student_id | sn    | name            | mail             | class_id |
//        +------------+-------+-----------------+------------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223 | tellme          | NULL             |        2 |
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |
//        +------------+-------+-----------------+------------------+----------+
//        8 rows in set (0.00 sec)
//
//mysql> select * from score;
//+----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+
//        |        1 |          1 |         1 | 70.50 |
//        |        2 |          1 |         3 | 98.50 |
//        |        3 |          1 |         5 | 33.00 |
//        |        4 |          1 |         6 | 98.00 |
//        |        5 |          2 |         1 | 60.00 |
//        |        6 |          2 |         5 | 59.50 |
//        |        7 |          3 |         1 | 33.00 |
//        |        8 |          3 |         3 | 68.00 |
//        |        9 |          3 |         5 | 99.00 |
//        |       10 |          4 |         1 | 67.00 |
//        |       11 |          4 |         3 | 23.00 |
//        |       12 |          4 |         5 | 56.00 |
//        |       13 |          4 |         6 | 72.00 |
//        |       14 |          5 |         1 | 81.00 |
//        |       15 |          5 |         5 | 37.00 |
//        |       16 |          6 |         2 | 56.00 |
//        |       17 |          6 |         4 | 43.00 |
//        |       18 |          6 |         6 | 79.00 |
//        |       19 |          7 |         2 | 80.00 |
//        |       20 |          7 |         6 | 92.00 |
//        |       21 |          1 |         1 | 70.50 |
//        |       22 |          1 |         3 | 98.50 |
//        |       23 |          2 |         1 | 60.00 |
//        +----------+------------+-----------+-------+
//        23 rows in set (0.00 sec)
//
//mysql> select score.class_id, score.score from score, student where student.student_id = score.student_id and student.name = '许仙';
//ERROR 1054 (42S22): Unknown column 'score.class_id' in 'field list'
//mysql> select score.course_id, course.name, score.score from student, score, course where name = '许仙' and student.stud
//        ent_id = score.student_id and score.course_id = course.courde_id;
//ERROR 1052 (23000): Column 'name' in where clause is ambiguous
//mysql> select score.course_id, course.name, score.score from student, score, course where student.name = '许仙' and stud
//ent.student_id = score.student_id and score.course_id = course.courde_id;
//ERROR 1054 (42S22): Unknown column 'course.courde_id' in 'where clause'
//mysql> select score.course_id, course.name, score.score from student, score, course where student.name = '许仙' and student.student_id = score.student_id and score.course_id = course.course_id;
//+-----------+-----------------+-------+
//        | course_id | name            | score |
//        +-----------+-----------------+-------+
//        |         1 | Java            | 67.00 |
//        |         3 | 计算机原理      | 23.00 |
//        |         5 | 高阶数学        | 56.00 |
//        |         6 | 英文            | 72.00 |
//        +-----------+-----------------+-------+
//        4 rows in set (0.01 sec)
//
//mysql> select * from student;
//+------------+-------+-----------------+------------------+----------+
//        | student_id | sn    | name            | mail             | class_id |
//        +------------+-------+-----------------+------------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223 | tellme          | NULL             |        2 |
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |
//        +------------+-------+-----------------+------------------+----------+
//        8 rows in set (0.00 sec)
//
//mysql> select student.student_id, student.sn, student.name, student.mail, student.class_id course.course_id, course.name
//, score.score where student.student_id = score.student_id and score.course_id = course.course_id group by score.student_
//        id;
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.course_id, course.name, score.score where student.student_id = score.student_id' at line 1
//mysql> select student.student_id, student.sn, student.name, student.mail, student.class_id, course.course_id, course.name, score.score where student.student_id = score.student_id and score.course_id = course.course_id group by score.student_id;
//ERROR 1109 (42S02): Unknown table 'student' in field list
//mysql> select student.student_id, student.sn, student.name, student.mail, student.class_id, course.course_id, course.name, score.score from student, score, course where student.student_id = score.student_id and score.course_id = course.cour
//se_id group by score.student_id;
//ERROR 1055 (42000): Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.course.course_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select student.student_id, student.sn, student.name, student.mail, student.class_id, course.course_id, course.name, score.score from student, score, course where student.student_id = score.student_id and score.course_id = course.course_id;
//+------------+-------+-----------------+-----------------+----------+-----------+--------------------+-------+
//        | student_id | sn    | name            | mail            | class_id | course_id | name               | score |
//        +------------+-------+-----------------+-----------------+----------+-----------+--------------------+-------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |         1 | Java               | 70.50 |
//        |          2 | 00835 | 菩提老祖        | NULL            |        1 |         1 | Java               | 60.00 |
//        |          3 | 00391 | 白素贞          | NULL            |        1 |         1 | Java               | 33.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 |         1 | Java               | 67.00 |
//        |          5 | 00054 | 不想毕业        | NULL            |        1 |         1 | Java               | 81.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |         1 | Java               | 70.50 |
//        |          2 | 00835 | 菩提老祖        | NULL            |        1 |         1 | Java               | 60.00 |
//        |          6 | 51234 | 好好说话        | say@qq.com      |        2 |         2 | 中国传统文化       | 56.00 |
//        |          7 | 83223 | tellme          | NULL            |        2 |         2 | 中国传统文化       | 80.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |         3 | 计算机原理         | 98.50 |
//        |          3 | 00391 | 白素贞          | NULL            |        1 |         3 | 计算机原理         | 68.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 |         3 | 计算机原理         | 23.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |         3 | 计算机原理         | 98.50 |
//        |          6 | 51234 | 好好说话        | say@qq.com      |        2 |         4 | 语文               | 43.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |         5 | 高阶数学           | 33.00 |
//        |          2 | 00835 | 菩提老祖        | NULL            |        1 |         5 | 高阶数学           | 59.50 |
//        |          3 | 00391 | 白素贞          | NULL            |        1 |         5 | 高阶数学           | 99.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 |         5 | 高阶数学           | 56.00 |
//        |          5 | 00054 | 不想毕业        | NULL            |        1 |         5 | 高阶数学           | 37.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |         6 | 英文               | 98.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 |         6 | 英文               | 72.00 |
//        |          6 | 51234 | 好好说话        | say@qq.com      |        2 |         6 | 英文               | 79.00 |
//        |          7 | 83223 | tellme          | NULL            |        2 |         6 | 英文               | 92.00 |
//        +------------+-------+-----------------+-----------------+----------+-----------+--------------------+-------+
//        23 rows in set (0.01 sec)
//
//mysql> use test;
//Database changed
//mysql> show tables;
//+----------------+
//        | Tables_in_test |
//        +----------------+
//        | class          |
//        | exam           |
//        | stu            |
//        | stu1           |
//        +----------------+
//        4 rows in set (0.00 sec)
//
//mysql> select * from class;
//+----+---------+
//        | id | name    |
//        +----+---------+
//        |  1 | java113 |
//        |  2 | java112 |
//        |  3 | java111 |
//        |  4 | java110 |
//        +----+---------+
//        4 rows in set (0.01 sec)
//
//mysql> select * from stu;
//+----+--------+----------+
//        | id | name   | class_id |
//        +----+--------+----------+
//        |  1 | 张三   |        1 |
//        |  2 | 李四   |        2 |
//        |  3 | 王五   |        3 |
//        +----+--------+----------+
//        3 rows in set (0.01 sec)
//
//mysql> select * from stu right join class on class.id = stu.class_id;
//+------+--------+----------+----+---------+
//        | id   | name   | class_id | id | name    |
//        +------+--------+----------+----+---------+
//        |    1 | 张三   |        1 |  1 | java113 |
//        |    2 | 李四   |        2 |  2 | java112 |
//        |    3 | 王五   |        3 |  3 | java111 |
//        | NULL | NULL   |     NULL |  4 | java110 |
//        +------+--------+----------+----+---------+
//        4 rows in set (0.01 sec)
//
//mysql> insert into stu (name, class_id) values ('测试用户', 5);
//ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`test`.`stu`, CONSTRAINT `stu_ibfk_1` FOREIGN KEY (`class_id`) REFERENCES `class` (`id`))
//mysql> select * from stu2;
//ERROR 1146 (42S02): Table 'test.stu2' doesn't exist
//mysql> select * from stu1;
//+----+--------+
//        | id | name   |
//        +----+--------+
//        |  1 | 张三   |
//        |  2 | 李四   |
//        |  3 | 王五   |
//        +----+--------+
//        3 rows in set (0.01 sec)
//
//mysql> use java113;
//Database changed
//mysql> show tables;
//+-------------------+
//        | Tables_in_java113 |
//        +-------------------+
//        | class             |
//        | course            |
//        | emp               |
//        | score             |
//        | stu2              |
//        | student           |
//        +-------------------+
//        6 rows in set (0.00 sec)
//
//mysql> desc class;
//+----------+-------------+------+-----+---------+----------------+
//        | Field    | Type        | Null | Key | Default | Extra          |
//        +----------+-------------+------+-----+---------+----------------+
//        | class_id | bigint      | NO   | PRI | NULL    | auto_increment |
//        | name     | varchar(50) | NO   |     | NULL    |                |
//        +----------+-------------+------+-----+---------+----------------+
//        2 rows in set (0.00 sec)
//
//mysql> desc course;
//+-----------+-------------+------+-----+---------+----------------+
//        | Field     | Type        | Null | Key | Default | Extra          |
//        +-----------+-------------+------+-----+---------+----------------+
//        | course_id | bigint      | NO   | PRI | NULL    | auto_increment |
//        | name      | varchar(50) | NO   |     | NULL    |                |
//        +-----------+-------------+------+-----+---------+----------------+
//        2 rows in set (0.00 sec)
//
//mysql> desc student;
//+------------+-------------+------+-----+---------+----------------+
//        | Field      | Type        | Null | Key | Default | Extra          |
//        +------------+-------------+------+-----+---------+----------------+
//        | student_id | bigint      | NO   | PRI | NULL    | auto_increment |
//        | sn         | varchar(6)  | YES  | UNI | NULL    |                |
//        | name       | varchar(50) | NO   |     | NULL    |                |
//        | mail       | varchar(50) | YES  |     | NULL    |                |
//        | class_id   | bigint      | YES  | MUL | NULL    |                |
//        +------------+-------------+------+-----+---------+----------------+
//        5 rows in set (0.00 sec)
//
//mysql> desc score;
//+------------+--------------+------+-----+---------+----------------+
//        | Field      | Type         | Null | Key | Default | Extra          |
//        +------------+--------------+------+-----+---------+----------------+
//        | score_id   | bigint       | NO   | PRI | NULL    | auto_increment |
//        | student_id | bigint       | YES  | MUL | NULL    |                |
//        | course_id  | bigint       | YES  | MUL | NULL    |                |
//        | score      | decimal(5,2) | YES  |     | NULL    |                |
//        +------------+--------------+------+-----+---------+----------------+
//        4 rows in set (0.00 sec)
//
//mysql> select * from student left join score on student.student_id = score.student_id;
//+------------+-------+-----------------+------------------+----------+----------+------------+-----------+-------+
//        | student_id | sn    | name            | mail             | class_id | score_id | student_id | course_id | score |
//        +------------+-------+-----------------+------------------+----------+----------+------------+-----------+-------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |        1 |          1 |         1 | 70.50 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |        2 |          1 |         3 | 98.50 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |        3 |          1 |         5 | 33.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |        4 |          1 |         6 | 98.00 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |       21 |          1 |         1 | 70.50 |
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |       22 |          1 |         3 | 98.50 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |        5 |          2 |         1 | 60.00 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |        6 |          2 |         5 | 59.50 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |       23 |          2 |         1 | 60.00 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |        7 |          3 |         1 | 33.00 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |        8 |          3 |         3 | 68.00 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |        9 |          3 |         5 | 99.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |       10 |          4 |         1 | 67.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |       11 |          4 |         3 | 23.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |       12 |          4 |         5 | 56.00 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |       13 |          4 |         6 | 72.00 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |       14 |          5 |         1 | 81.00 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |       15 |          5 |         5 | 37.00 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |       16 |          6 |         2 | 56.00 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |       17 |          6 |         4 | 43.00 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |       18 |          6 |         6 | 79.00 |
//        |          7 | 83223 | tellme          | NULL             |        2 |       19 |          7 |         2 | 80.00 |
//        |          7 | 83223 | tellme          | NULL             |        2 |       20 |          7 |         6 | 92.00 |
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |     NULL |       NULL |      NULL |  NULL |
//        +------------+-------+-----------------+------------------+----------+----------+------------+-----------+-------+
//        24 rows in set (0.00 sec)
//
//mysql> select * from student left join score on student.student_id = score.student_id where score is null;
//        +------------+-------+-----------------+------------------+----------+----------+------------+-----------+-------+
//        | student_id | sn    | name            | mail             | class_id | score_id | student_id | course_id | score |
//        +------------+-------+-----------------+------------------+----------+----------+------------+-----------+-------+
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |     NULL |       NULL |      NULL |  NULL |
//        +------------+-------+-----------------+------------------+----------+----------+------------+-----------+-------+
//        1 row in set (0.00 sec)
//
//mysql> desc score;
//+------------+--------------+------+-----+---------+----------------+
//        | Field      | Type         | Null | Key | Default | Extra          |
//        +------------+--------------+------+-----+---------+----------------+
//        | score_id   | bigint       | NO   | PRI | NULL    | auto_increment |
//        | student_id | bigint       | YES  | MUL | NULL    |                |
//        | course_id  | bigint       | YES  | MUL | NULL    |                |
//        | score      | decimal(5,2) | YES  |     | NULL    |                |
//        +------------+--------------+------+-----+---------+----------------+
//        4 rows in set (0.00 sec)
//
//mysql> select * from score as s1, score as s2 where s1.student_id = s2.student_id;
//+----------+------------+-----------+-------+----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+----------+------------+-----------+-------+
//        |        1 |          1 |         1 | 70.50 |        1 |          1 |         1 | 70.50 |
//        |        1 |          1 |         1 | 70.50 |        2 |          1 |         3 | 98.50 |
//        |        1 |          1 |         1 | 70.50 |        3 |          1 |         5 | 33.00 |
//        |        1 |          1 |         1 | 70.50 |        4 |          1 |         6 | 98.00 |
//        |        1 |          1 |         1 | 70.50 |       21 |          1 |         1 | 70.50 |
//        |        1 |          1 |         1 | 70.50 |       22 |          1 |         3 | 98.50 |
//        |        2 |          1 |         3 | 98.50 |        1 |          1 |         1 | 70.50 |
//        |        2 |          1 |         3 | 98.50 |        2 |          1 |         3 | 98.50 |
//        |        2 |          1 |         3 | 98.50 |        3 |          1 |         5 | 33.00 |
//        |        2 |          1 |         3 | 98.50 |        4 |          1 |         6 | 98.00 |
//        |        2 |          1 |         3 | 98.50 |       21 |          1 |         1 | 70.50 |
//        |        2 |          1 |         3 | 98.50 |       22 |          1 |         3 | 98.50 |
//        |        3 |          1 |         5 | 33.00 |        1 |          1 |         1 | 70.50 |
//        |        3 |          1 |         5 | 33.00 |        2 |          1 |         3 | 98.50 |
//        |        3 |          1 |         5 | 33.00 |        3 |          1 |         5 | 33.00 |
//        |        3 |          1 |         5 | 33.00 |        4 |          1 |         6 | 98.00 |
//        |        3 |          1 |         5 | 33.00 |       21 |          1 |         1 | 70.50 |
//        |        3 |          1 |         5 | 33.00 |       22 |          1 |         3 | 98.50 |
//        |        4 |          1 |         6 | 98.00 |        1 |          1 |         1 | 70.50 |
//        |        4 |          1 |         6 | 98.00 |        2 |          1 |         3 | 98.50 |
//        |        4 |          1 |         6 | 98.00 |        3 |          1 |         5 | 33.00 |
//        |        4 |          1 |         6 | 98.00 |        4 |          1 |         6 | 98.00 |
//        |        4 |          1 |         6 | 98.00 |       21 |          1 |         1 | 70.50 |
//        |        4 |          1 |         6 | 98.00 |       22 |          1 |         3 | 98.50 |
//        |        5 |          2 |         1 | 60.00 |        5 |          2 |         1 | 60.00 |
//        |        5 |          2 |         1 | 60.00 |        6 |          2 |         5 | 59.50 |
//        |        5 |          2 |         1 | 60.00 |       23 |          2 |         1 | 60.00 |
//        |        6 |          2 |         5 | 59.50 |        5 |          2 |         1 | 60.00 |
//        |        6 |          2 |         5 | 59.50 |        6 |          2 |         5 | 59.50 |
//        |        6 |          2 |         5 | 59.50 |       23 |          2 |         1 | 60.00 |
//        |        7 |          3 |         1 | 33.00 |        7 |          3 |         1 | 33.00 |
//        |        7 |          3 |         1 | 33.00 |        8 |          3 |         3 | 68.00 |
//        |        7 |          3 |         1 | 33.00 |        9 |          3 |         5 | 99.00 |
//        |        8 |          3 |         3 | 68.00 |        7 |          3 |         1 | 33.00 |
//        |        8 |          3 |         3 | 68.00 |        8 |          3 |         3 | 68.00 |
//        |        8 |          3 |         3 | 68.00 |        9 |          3 |         5 | 99.00 |
//        |        9 |          3 |         5 | 99.00 |        7 |          3 |         1 | 33.00 |
//        |        9 |          3 |         5 | 99.00 |        8 |          3 |         3 | 68.00 |
//        |        9 |          3 |         5 | 99.00 |        9 |          3 |         5 | 99.00 |
//        |       10 |          4 |         1 | 67.00 |       10 |          4 |         1 | 67.00 |
//        |       10 |          4 |         1 | 67.00 |       11 |          4 |         3 | 23.00 |
//        |       10 |          4 |         1 | 67.00 |       12 |          4 |         5 | 56.00 |
//        |       10 |          4 |         1 | 67.00 |       13 |          4 |         6 | 72.00 |
//        |       11 |          4 |         3 | 23.00 |       10 |          4 |         1 | 67.00 |
//        |       11 |          4 |         3 | 23.00 |       11 |          4 |         3 | 23.00 |
//        |       11 |          4 |         3 | 23.00 |       12 |          4 |         5 | 56.00 |
//        |       11 |          4 |         3 | 23.00 |       13 |          4 |         6 | 72.00 |
//        |       12 |          4 |         5 | 56.00 |       10 |          4 |         1 | 67.00 |
//        |       12 |          4 |         5 | 56.00 |       11 |          4 |         3 | 23.00 |
//        |       12 |          4 |         5 | 56.00 |       12 |          4 |         5 | 56.00 |
//        |       12 |          4 |         5 | 56.00 |       13 |          4 |         6 | 72.00 |
//        |       13 |          4 |         6 | 72.00 |       10 |          4 |         1 | 67.00 |
//        |       13 |          4 |         6 | 72.00 |       11 |          4 |         3 | 23.00 |
//        |       13 |          4 |         6 | 72.00 |       12 |          4 |         5 | 56.00 |
//        |       13 |          4 |         6 | 72.00 |       13 |          4 |         6 | 72.00 |
//        |       14 |          5 |         1 | 81.00 |       14 |          5 |         1 | 81.00 |
//        |       14 |          5 |         1 | 81.00 |       15 |          5 |         5 | 37.00 |
//        |       15 |          5 |         5 | 37.00 |       14 |          5 |         1 | 81.00 |
//        |       15 |          5 |         5 | 37.00 |       15 |          5 |         5 | 37.00 |
//        |       16 |          6 |         2 | 56.00 |       16 |          6 |         2 | 56.00 |
//        |       16 |          6 |         2 | 56.00 |       17 |          6 |         4 | 43.00 |
//        |       16 |          6 |         2 | 56.00 |       18 |          6 |         6 | 79.00 |
//        |       17 |          6 |         4 | 43.00 |       16 |          6 |         2 | 56.00 |
//        |       17 |          6 |         4 | 43.00 |       17 |          6 |         4 | 43.00 |
//        |       17 |          6 |         4 | 43.00 |       18 |          6 |         6 | 79.00 |
//        |       18 |          6 |         6 | 79.00 |       16 |          6 |         2 | 56.00 |
//        |       18 |          6 |         6 | 79.00 |       17 |          6 |         4 | 43.00 |
//        |       18 |          6 |         6 | 79.00 |       18 |          6 |         6 | 79.00 |
//        |       19 |          7 |         2 | 80.00 |       19 |          7 |         2 | 80.00 |
//        |       19 |          7 |         2 | 80.00 |       20 |          7 |         6 | 92.00 |
//        |       20 |          7 |         6 | 92.00 |       19 |          7 |         2 | 80.00 |
//        |       20 |          7 |         6 | 92.00 |       20 |          7 |         6 | 92.00 |
//        |       21 |          1 |         1 | 70.50 |        1 |          1 |         1 | 70.50 |
//        |       21 |          1 |         1 | 70.50 |        2 |          1 |         3 | 98.50 |
//        |       21 |          1 |         1 | 70.50 |        3 |          1 |         5 | 33.00 |
//        |       21 |          1 |         1 | 70.50 |        4 |          1 |         6 | 98.00 |
//        |       21 |          1 |         1 | 70.50 |       21 |          1 |         1 | 70.50 |
//        |       21 |          1 |         1 | 70.50 |       22 |          1 |         3 | 98.50 |
//        |       22 |          1 |         3 | 98.50 |        1 |          1 |         1 | 70.50 |
//        |       22 |          1 |         3 | 98.50 |        2 |          1 |         3 | 98.50 |
//        |       22 |          1 |         3 | 98.50 |        3 |          1 |         5 | 33.00 |
//        |       22 |          1 |         3 | 98.50 |        4 |          1 |         6 | 98.00 |
//        |       22 |          1 |         3 | 98.50 |       21 |          1 |         1 | 70.50 |
//        |       22 |          1 |         3 | 98.50 |       22 |          1 |         3 | 98.50 |
//        |       23 |          2 |         1 | 60.00 |        5 |          2 |         1 | 60.00 |
//        |       23 |          2 |         1 | 60.00 |        6 |          2 |         5 | 59.50 |
//        |       23 |          2 |         1 | 60.00 |       23 |          2 |         1 | 60.00 |
//        +----------+------------+-----------+-------+----------+------------+-----------+-------+
//        87 rows in set (0.00 sec)
//
//mysql> select * from course where name in ('Java', '计算机原理');
//+-----------+-----------------+
//        | course_id | name            |
//        +-----------+-----------------+
//        |         1 | Java            |
//        |         3 | 计算机原理      |
//        +-----------+-----------------+
//        2 rows in set (0.00 sec)
//
//mysql> select * from score as s1, score as s2 where s1.student_id = s2.student_id and s1.course_id = 1 and s2.course_id
//= 3 and s1.score < s2.score;
//+----------+------------+-----------+-------+----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+----------+------------+-----------+-------+
//        |        1 |          1 |         1 | 70.50 |        2 |          1 |         3 | 98.50 |
//        |       21 |          1 |         1 | 70.50 |        2 |          1 |         3 | 98.50 |
//        |        7 |          3 |         1 | 33.00 |        8 |          3 |         3 | 68.00 |
//        |        1 |          1 |         1 | 70.50 |       22 |          1 |         3 | 98.50 |
//        |       21 |          1 |         1 | 70.50 |       22 |          1 |         3 | 98.50 |
//        +----------+------------+-----------+-------+----------+------------+-----------+-------+
//        5 rows in set (0.00 sec)
//
//mysql> select * from student where class_id in (select class_id from student where name = '不想毕业');
//+------------+-------+-----------------+-----------------+----------+
//        | student_id | sn    | name            | mail            | class_id |
//        +------------+-------+-----------------+-----------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL            |        1 |
//        |          3 | 00391 | 白素贞          | NULL            |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 |
//        |          5 | 00054 | 不想毕业        | NULL            |        1 |
//        +------------+-------+-----------------+-----------------+----------+
//        5 rows in set (0.00 sec)
//
//mysql> select * from student where class_id = (select class_id from student where name = '不想毕业') and name != '不想毕业';
//        +------------+-------+-----------------+-----------------+----------+
//        | student_id | sn    | name            | mail            | class_id |
//        +------------+-------+-----------------+-----------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL            |        1 |
//        |          3 | 00391 | 白素贞          | NULL            |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com   |        1 |
//        +------------+-------+-----------------+-----------------+----------+
//        4 rows in set (0.03 sec)
//
//mysql> select * from course where course_id in (select course_id from course where name = '语文' or name = '英文');
//+-----------+--------+
//        | course_id | name   |
//        +-----------+--------+
//        |         4 | 语文   |
//        |         6 | 英文   |
//        +-----------+--------+
//        2 rows in set (0.00 sec)
//
//mysql> select * from student where class_id = (select class_id from student where name = '不想毕业') and name != '不想毕业';^C
//mysql> select * from score where course_id in (select course_id from course where name in ('语文', '英文'));
//        +----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+
//        |       17 |          6 |         4 | 43.00 |
//        |        4 |          1 |         6 | 98.00 |
//        |       13 |          4 |         6 | 72.00 |
//        |       18 |          6 |         6 | 79.00 |
//        |       20 |          7 |         6 | 92.00 |
//        +----------+------------+-----------+-------+
//        5 rows in set (0.00 sec)
//
//mysql> select * from score where course_id not in (select course_id from course where name in ('语文', '英文'));
//        +----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+
//        |        1 |          1 |         1 | 70.50 |
//        |        2 |          1 |         3 | 98.50 |
//        |        3 |          1 |         5 | 33.00 |
//        |        5 |          2 |         1 | 60.00 |
//        |        6 |          2 |         5 | 59.50 |
//        |        7 |          3 |         1 | 33.00 |
//        |        8 |          3 |         3 | 68.00 |
//        |        9 |          3 |         5 | 99.00 |
//        |       10 |          4 |         1 | 67.00 |
//        |       11 |          4 |         3 | 23.00 |
//        |       12 |          4 |         5 | 56.00 |
//        |       14 |          5 |         1 | 81.00 |
//        |       15 |          5 |         5 | 37.00 |
//        |       16 |          6 |         2 | 56.00 |
//        |       19 |          7 |         2 | 80.00 |
//        |       21 |          1 |         1 | 70.50 |
//        |       22 |          1 |         3 | 98.50 |
//        |       23 |          2 |         1 | 60.00 |
//        +----------+------------+-----------+-------+
//        18 rows in set (0.00 sec)
//
//mysql> select * from score group by score having count(score) > 1;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.score_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select * from score group by score havin^Ccount(score) > 1;
//mysql> select * from score group by score;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.score_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select * from score group by score.score;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.score_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select sum(score) from score broup by score;
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by score' at line 1
//mysql> select sum(score) from score group by score;
//+------------+
//        | sum(score) |
//        +------------+
//        |     141.00 |
//        |     197.00 |
//        |      66.00 |
//        |      98.00 |
//        |     120.00 |
//        |      59.50 |
//        |      68.00 |
//        |      99.00 |
//        |      67.00 |
//        |      23.00 |
//        |     112.00 |
//        |      72.00 |
//        |      81.00 |
//        |      37.00 |
//        |      43.00 |
//        |      79.00 |
//        |      80.00 |
//        |      92.00 |
//        +------------+
//        18 rows in set (0.00 sec)
//
//mysql> select count(score) from score group by score having count(score) > 1;
//        +--------------+
//        | count(score) |
//        +--------------+
//        |            2 |
//        |            2 |
//        |            2 |
//        |            2 |
//        |            2 |
//        +--------------+
//        5 rows in set (0.00 sec)
//
//mysql> select student_id, score from score group by score having count(score) > 1;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.student_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select student_id, score, count(score) from score group by score having count(score) > 1;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.student_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select * from score group by student_id, course_id, score group by score having count(score) > 1;
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by score having count(score) > 1' at line 1
//mysql> select * from score group by student_id, course_id, score having count(score) > 1;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.score_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select * from score group by student_id, course_id, score having count(*) > 1;
//ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'java113.score.score_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
//mysql> select student_id, course_id, score from score group by student_id, course_id, score having count(*) > 1;
//        +------------+-----------+-------+
//        | student_id | course_id | score |
//        +------------+-----------+-------+
//        |          1 |         1 | 70.50 |
//        |          1 |         3 | 98.50 |
//        |          2 |         1 | 60.00 |
//        +------------+-----------+-------+
//        3 rows in set (0.00 sec)
//
//mysql> select score, count(score) from score group by score;
//+-------+--------------+
//        | score | count(score) |
//        +-------+--------------+
//        | 70.50 |            2 |
//        | 98.50 |            2 |
//        | 33.00 |            2 |
//        | 98.00 |            1 |
//        | 60.00 |            2 |
//        | 59.50 |            1 |
//        | 68.00 |            1 |
//        | 99.00 |            1 |
//        | 67.00 |            1 |
//        | 23.00 |            1 |
//        | 56.00 |            2 |
//        | 72.00 |            1 |
//        | 81.00 |            1 |
//        | 37.00 |            1 |
//        | 43.00 |            1 |
//        | 79.00 |            1 |
//        | 80.00 |            1 |
//        | 92.00 |            1 |
//        +-------+--------------+
//        18 rows in set (0.00 sec)
//
//mysql> select score, count(score) from score group by score having count(score) > 1;
//        +-------+--------------+
//        | score | count(score) |
//        +-------+--------------+
//        | 70.50 |            2 |
//        | 98.50 |            2 |
//        | 33.00 |            2 |
//        | 60.00 |            2 |
//        | 56.00 |            2 |
//        +-------+--------------+
//        5 rows in set (0.00 sec)
//
//mysql> select student, course_id, score from score group by student_id, course_id, score having count(score) > 1;
//ERROR 1054 (42S22): Unknown column 'student' in 'field list'
//mysql> select student_id, course_id, score from score group by student_id, course_id, score having count(score) > 1;
//        +------------+-----------+-------+
//        | student_id | course_id | score |
//        +------------+-----------+-------+
//        |          1 |         1 | 70.50 |
//        |          1 |         3 | 98.50 |
//        |          2 |         1 | 60.00 |
//        +------------+-----------+-------+
//        3 rows in set (0.00 sec)
//
//mysql> select * from score where exists (null);
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null)' at line 1
//mysql> select * from score where exists (select * from student where name is null);
//Empty set (0.00 sec)
//
//mysql> select * from student where exists (select null);
//+------------+-------+-----------------+------------------+----------+
//        | student_id | sn    | name            | mail             | class_id |
//        +------------+-------+-----------------+------------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223 | tellme          | NULL             |        2 |
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |
//        +------------+-------+-----------------+------------------+----------+
//        8 rows in set (0.00 sec)
//
//mysql> select * from course, score;
//+-----------+--------------------+----------+------------+-----------+-------+
//        | course_id | name               | score_id | student_id | course_id | score |
//        +-----------+--------------------+----------+------------+-----------+-------+
//        |         6 | 英文               |        1 |          1 |         1 | 70.50 |
//        |         5 | 高阶数学           |        1 |          1 |         1 | 70.50 |
//        |         4 | 语文               |        1 |          1 |         1 | 70.50 |
//        |         3 | 计算机原理         |        1 |          1 |         1 | 70.50 |
//        |         2 | 中国传统文化       |        1 |          1 |         1 | 70.50 |
//        |         1 | Java               |        1 |          1 |         1 | 70.50 |
//        |         6 | 英文               |        2 |          1 |         3 | 98.50 |
//        |         5 | 高阶数学           |        2 |          1 |         3 | 98.50 |
//        |         4 | 语文               |        2 |          1 |         3 | 98.50 |
//        |         3 | 计算机原理         |        2 |          1 |         3 | 98.50 |
//        |         2 | 中国传统文化       |        2 |          1 |         3 | 98.50 |
//        |         1 | Java               |        2 |          1 |         3 | 98.50 |
//        |         6 | 英文               |        3 |          1 |         5 | 33.00 |
//        |         5 | 高阶数学           |        3 |          1 |         5 | 33.00 |
//        |         4 | 语文               |        3 |          1 |         5 | 33.00 |
//        |         3 | 计算机原理         |        3 |          1 |         5 | 33.00 |
//        |         2 | 中国传统文化       |        3 |          1 |         5 | 33.00 |
//        |         1 | Java               |        3 |          1 |         5 | 33.00 |
//        |         6 | 英文               |        4 |          1 |         6 | 98.00 |
//        |         5 | 高阶数学           |        4 |          1 |         6 | 98.00 |
//        |         4 | 语文               |        4 |          1 |         6 | 98.00 |
//        |         3 | 计算机原理         |        4 |          1 |         6 | 98.00 |
//        |         2 | 中国传统文化       |        4 |          1 |         6 | 98.00 |
//        |         1 | Java               |        4 |          1 |         6 | 98.00 |
//        |         6 | 英文               |        5 |          2 |         1 | 60.00 |
//        |         5 | 高阶数学           |        5 |          2 |         1 | 60.00 |
//        |         4 | 语文               |        5 |          2 |         1 | 60.00 |
//        |         3 | 计算机原理         |        5 |          2 |         1 | 60.00 |
//        |         2 | 中国传统文化       |        5 |          2 |         1 | 60.00 |
//        |         1 | Java               |        5 |          2 |         1 | 60.00 |
//        |         6 | 英文               |        6 |          2 |         5 | 59.50 |
//        |         5 | 高阶数学           |        6 |          2 |         5 | 59.50 |
//        |         4 | 语文               |        6 |          2 |         5 | 59.50 |
//        |         3 | 计算机原理         |        6 |          2 |         5 | 59.50 |
//        |         2 | 中国传统文化       |        6 |          2 |         5 | 59.50 |
//        |         1 | Java               |        6 |          2 |         5 | 59.50 |
//        |         6 | 英文               |        7 |          3 |         1 | 33.00 |
//        |         5 | 高阶数学           |        7 |          3 |         1 | 33.00 |
//        |         4 | 语文               |        7 |          3 |         1 | 33.00 |
//        |         3 | 计算机原理         |        7 |          3 |         1 | 33.00 |
//        |         2 | 中国传统文化       |        7 |          3 |         1 | 33.00 |
//        |         1 | Java               |        7 |          3 |         1 | 33.00 |
//        |         6 | 英文               |        8 |          3 |         3 | 68.00 |
//        |         5 | 高阶数学           |        8 |          3 |         3 | 68.00 |
//        |         4 | 语文               |        8 |          3 |         3 | 68.00 |
//        |         3 | 计算机原理         |        8 |          3 |         3 | 68.00 |
//        |         2 | 中国传统文化       |        8 |          3 |         3 | 68.00 |
//        |         1 | Java               |        8 |          3 |         3 | 68.00 |
//        |         6 | 英文               |        9 |          3 |         5 | 99.00 |
//        |         5 | 高阶数学           |        9 |          3 |         5 | 99.00 |
//        |         4 | 语文               |        9 |          3 |         5 | 99.00 |
//        |         3 | 计算机原理         |        9 |          3 |         5 | 99.00 |
//        |         2 | 中国传统文化       |        9 |          3 |         5 | 99.00 |
//        |         1 | Java               |        9 |          3 |         5 | 99.00 |
//        |         6 | 英文               |       10 |          4 |         1 | 67.00 |
//        |         5 | 高阶数学           |       10 |          4 |         1 | 67.00 |
//        |         4 | 语文               |       10 |          4 |         1 | 67.00 |
//        |         3 | 计算机原理         |       10 |          4 |         1 | 67.00 |
//        |         2 | 中国传统文化       |       10 |          4 |         1 | 67.00 |
//        |         1 | Java               |       10 |          4 |         1 | 67.00 |
//        |         6 | 英文               |       11 |          4 |         3 | 23.00 |
//        |         5 | 高阶数学           |       11 |          4 |         3 | 23.00 |
//        |         4 | 语文               |       11 |          4 |         3 | 23.00 |
//        |         3 | 计算机原理         |       11 |          4 |         3 | 23.00 |
//        |         2 | 中国传统文化       |       11 |          4 |         3 | 23.00 |
//        |         1 | Java               |       11 |          4 |         3 | 23.00 |
//        |         6 | 英文               |       12 |          4 |         5 | 56.00 |
//        |         5 | 高阶数学           |       12 |          4 |         5 | 56.00 |
//        |         4 | 语文               |       12 |          4 |         5 | 56.00 |
//        |         3 | 计算机原理         |       12 |          4 |         5 | 56.00 |
//        |         2 | 中国传统文化       |       12 |          4 |         5 | 56.00 |
//        |         1 | Java               |       12 |          4 |         5 | 56.00 |
//        |         6 | 英文               |       13 |          4 |         6 | 72.00 |
//        |         5 | 高阶数学           |       13 |          4 |         6 | 72.00 |
//        |         4 | 语文               |       13 |          4 |         6 | 72.00 |
//        |         3 | 计算机原理         |       13 |          4 |         6 | 72.00 |
//        |         2 | 中国传统文化       |       13 |          4 |         6 | 72.00 |
//        |         1 | Java               |       13 |          4 |         6 | 72.00 |
//        |         6 | 英文               |       14 |          5 |         1 | 81.00 |
//        |         5 | 高阶数学           |       14 |          5 |         1 | 81.00 |
//        |         4 | 语文               |       14 |          5 |         1 | 81.00 |
//        |         3 | 计算机原理         |       14 |          5 |         1 | 81.00 |
//        |         2 | 中国传统文化       |       14 |          5 |         1 | 81.00 |
//        |         1 | Java               |       14 |          5 |         1 | 81.00 |
//        |         6 | 英文               |       15 |          5 |         5 | 37.00 |
//        |         5 | 高阶数学           |       15 |          5 |         5 | 37.00 |
//        |         4 | 语文               |       15 |          5 |         5 | 37.00 |
//        |         3 | 计算机原理         |       15 |          5 |         5 | 37.00 |
//        |         2 | 中国传统文化       |       15 |          5 |         5 | 37.00 |
//        |         1 | Java               |       15 |          5 |         5 | 37.00 |
//        |         6 | 英文               |       16 |          6 |         2 | 56.00 |
//        |         5 | 高阶数学           |       16 |          6 |         2 | 56.00 |
//        |         4 | 语文               |       16 |          6 |         2 | 56.00 |
//        |         3 | 计算机原理         |       16 |          6 |         2 | 56.00 |
//        |         2 | 中国传统文化       |       16 |          6 |         2 | 56.00 |
//        |         1 | Java               |       16 |          6 |         2 | 56.00 |
//        |         6 | 英文               |       17 |          6 |         4 | 43.00 |
//        |         5 | 高阶数学           |       17 |          6 |         4 | 43.00 |
//        |         4 | 语文               |       17 |          6 |         4 | 43.00 |
//        |         3 | 计算机原理         |       17 |          6 |         4 | 43.00 |
//        |         2 | 中国传统文化       |       17 |          6 |         4 | 43.00 |
//        |         1 | Java               |       17 |          6 |         4 | 43.00 |
//        |         6 | 英文               |       18 |          6 |         6 | 79.00 |
//        |         5 | 高阶数学           |       18 |          6 |         6 | 79.00 |
//        |         4 | 语文               |       18 |          6 |         6 | 79.00 |
//        |         3 | 计算机原理         |       18 |          6 |         6 | 79.00 |
//        |         2 | 中国传统文化       |       18 |          6 |         6 | 79.00 |
//        |         1 | Java               |       18 |          6 |         6 | 79.00 |
//        |         6 | 英文               |       19 |          7 |         2 | 80.00 |
//        |         5 | 高阶数学           |       19 |          7 |         2 | 80.00 |
//        |         4 | 语文               |       19 |          7 |         2 | 80.00 |
//        |         3 | 计算机原理         |       19 |          7 |         2 | 80.00 |
//        |         2 | 中国传统文化       |       19 |          7 |         2 | 80.00 |
//        |         1 | Java               |       19 |          7 |         2 | 80.00 |
//        |         6 | 英文               |       20 |          7 |         6 | 92.00 |
//        |         5 | 高阶数学           |       20 |          7 |         6 | 92.00 |
//        |         4 | 语文               |       20 |          7 |         6 | 92.00 |
//        |         3 | 计算机原理         |       20 |          7 |         6 | 92.00 |
//        |         2 | 中国传统文化       |       20 |          7 |         6 | 92.00 |
//        |         1 | Java               |       20 |          7 |         6 | 92.00 |
//        |         6 | 英文               |       21 |          1 |         1 | 70.50 |
//        |         5 | 高阶数学           |       21 |          1 |         1 | 70.50 |
//        |         4 | 语文               |       21 |          1 |         1 | 70.50 |
//        |         3 | 计算机原理         |       21 |          1 |         1 | 70.50 |
//        |         2 | 中国传统文化       |       21 |          1 |         1 | 70.50 |
//        |         1 | Java               |       21 |          1 |         1 | 70.50 |
//        |         6 | 英文               |       22 |          1 |         3 | 98.50 |
//        |         5 | 高阶数学           |       22 |          1 |         3 | 98.50 |
//        |         4 | 语文               |       22 |          1 |         3 | 98.50 |
//        |         3 | 计算机原理         |       22 |          1 |         3 | 98.50 |
//        |         2 | 中国传统文化       |       22 |          1 |         3 | 98.50 |
//        |         1 | Java               |       22 |          1 |         3 | 98.50 |
//        |         6 | 英文               |       23 |          2 |         1 | 60.00 |
//        |         5 | 高阶数学           |       23 |          2 |         1 | 60.00 |
//        |         4 | 语文               |       23 |          2 |         1 | 60.00 |
//        |         3 | 计算机原理         |       23 |          2 |         1 | 60.00 |
//        |         2 | 中国传统文化       |       23 |          2 |         1 | 60.00 |
//        |         1 | Java               |       23 |          2 |         1 | 60.00 |
//        +-----------+--------------------+----------+------------+-----------+-------+
//        138 rows in set (0.00 sec)
//
//mysql> select * from class where name = '中文系2019级3班';
//        +----------+----------------------+
//        | class_id | name                 |
//        +----------+----------------------+
//        |        2 | 中文系2019级3班      |
//        +----------+----------------------+
//        1 row in set (0.00 sec)
//
//mysql> select avg(score) from score where class_id = (select * from class where name = '中文系2019级3班');
//ERROR 1054 (42S22): Unknown column 'class_id' in 'where clause'
//mysql> select avg(score) from score where course_id = (select * from class where name = '中文系2019级3班');
//ERROR 1241 (21000): Operand should contain 1 column(s)
//mysql> select * from class where name = '中文系2019级3班'
//        -> ;
//        +----------+----------------------+
//        | class_id | name                 |
//        +----------+----------------------+
//        |        2 | 中文系2019级3班      |
//        +----------+----------------------+
//        1 row in set (0.00 sec)
//
//mysql> select student_id from student where class_id = (select * from class where name = '中文系2019级3班');
//ERROR 1241 (21000): Operand should contain 1 column(s)
//mysql> select student_id from student where class_id = (select class_id from class where name = '中文系2019级3班');
//        +------------+
//        | student_id |
//        +------------+
//        |          6 |
//        |          7 |
//        |          8 |
//        +------------+
//        3 rows in set (0.00 sec)
//
//mysql> select * from score where student_id in (select student_id from student where class_id = (select class_id from class where name = '中文系2019级3班'));
//        +----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+
//        |       16 |          6 |         2 | 56.00 |
//        |       17 |          6 |         4 | 43.00 |
//        |       18 |          6 |         6 | 79.00 |
//        |       19 |          7 |         2 | 80.00 |
//        |       20 |          7 |         6 | 92.00 |
//        +----------+------------+-----------+-------+
//        5 rows in set (0.00 sec)
//
//mysql> select avg(score) where student_id in (select student_id from student where class_id = (select class_id from class where name = '中文系2019级3班'));
//ERROR 1054 (42S22): Unknown column 'score' in 'field list'
//mysql> select avg(score) from score where student_id in (select student_id from student where class_id = (select class_i
//d from class where name = '中文系2019级3班'));
//        +------------+
//        | avg(score) |
//        +------------+
//        |  70.000000 |
//        +------------+
//        1 row in set (0.00 sec)
//
//mysql> select avg(score) from score where avg(score) > (select avg(score) from score where student_id in (select student_id from student where class_id = (select class_i)
//        -> d from class where name = '中文系2019级3班'));
//ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'd from class where name = '中文系2019级3班'))' at line 2
//mysql> select student_id from student where class_id = (select * from class where name = '中文系2019级3班');^C
//mysql> select avg(score) from score where avg(score) > (select avg(score) from score where student_id in (select student_id from student where class_id = (select class_id from class where name = '中文系2019级3班')));
//ERROR 1111 (HY000): Invalid use of group function
//mysql> select * from score where score > (select avg(score) from score where student_id in (select student_id from stude
//nt where class_id = (select class_id from class where name = '中文系2019级3班')));
//        +----------+------------+-----------+-------+
//        | score_id | student_id | course_id | score |
//        +----------+------------+-----------+-------+
//        |        1 |          1 |         1 | 70.50 |
//        |        2 |          1 |         3 | 98.50 |
//        |        4 |          1 |         6 | 98.00 |
//        |        9 |          3 |         5 | 99.00 |
//        |       13 |          4 |         6 | 72.00 |
//        |       14 |          5 |         1 | 81.00 |
//        |       18 |          6 |         6 | 79.00 |
//        |       19 |          7 |         2 | 80.00 |
//        |       20 |          7 |         6 | 92.00 |
//        |       21 |          1 |         1 | 70.50 |
//        |       22 |          1 |         3 | 98.50 |
//        +----------+------------+-----------+-------+
//        11 rows in set (0.00 sec)
//
//mysql> select * from stu2;
//+------------+--------+-----------------+-----------------+----------+
//        | student_id | sn     | name            | mail            | class_id |
//        +------------+--------+-----------------+-----------------+----------+
//        |          1 | 09982  | 黑旋风李逵      | xuanfeng@qq.com |        1 |
//        |          2 | 000001 | 测 试           | NULL            |        2 |
//        +------------+--------+-----------------+-----------------+----------+
//        2 rows in set (0.01 sec)
//
//mysql> select * from stu;
//ERROR 1146 (42S02): Table 'java113.stu' doesn't exist
//mysql> select * from student;
//+------------+-------+-----------------+------------------+----------+
//        | student_id | sn    | name            | mail             | class_id |
//        +------------+-------+-----------------+------------------+----------+
//        |          1 | 09982 | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835 | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391 | 白素贞          | NULL             |        1 |
//        |          4 | 00031 | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054 | 不想毕业        | NULL             |        1 |
//        |          6 | 51234 | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223 | tellme          | NULL             |        2 |
//        |          8 | 09527 | 老外学中文      | foreigner@qq.com |        2 |
//        +------------+-------+-----------------+------------------+----------+
//        8 rows in set (0.00 sec)
//
//mysql> select * from student union select * from stu2;
//+------------+--------+-----------------+------------------+----------+
//        | student_id | sn     | name            | mail             | class_id |
//        +------------+--------+-----------------+------------------+----------+
//        |          1 | 09982  | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835  | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391  | 白素贞          | NULL             |        1 |
//        |          4 | 00031  | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054  | 不想毕业        | NULL             |        1 |
//        |          6 | 51234  | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223  | tellme          | NULL             |        2 |
//        |          8 | 09527  | 老外学中文      | foreigner@qq.com |        2 |
//        |          2 | 000001 | 测 试           | NULL             |        2 |
//        +------------+--------+-----------------+------------------+----------+
//        9 rows in set (0.00 sec)
//
//mysql> select * from stu2 union all select * from student;
//+------------+--------+-----------------+------------------+----------+
//        | student_id | sn     | name            | mail             | class_id |
//        +------------+--------+-----------------+------------------+----------+
//        |          1 | 09982  | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 000001 | 测 试           | NULL             |        2 |
//        |          1 | 09982  | 黑旋风李逵      | xuanfeng@qq.com  |        1 |
//        |          2 | 00835  | 菩提老祖        | NULL             |        1 |
//        |          3 | 00391  | 白素贞          | NULL             |        1 |
//        |          4 | 00031  | 许仙            | xuxian@qq.com    |        1 |
//        |          5 | 00054  | 不想毕业        | NULL             |        1 |
//        |          6 | 51234  | 好好说话        | say@qq.com       |        2 |
//        |          7 | 83223  | tellme          | NULL             |        2 |
//        |          8 | 09527  | 老外学中文      | foreigner@qq.com |        2 |
//        +------------+--------+-----------------+------------------+----------+
//        10 rows in set (0.00 sec)
//
//mysql> select * from student union select * from class;
//ERROR 1222 (21000): The used SELECT statements have a different number of columns
//mysql> select name, sn from student union select student_id, mail from student;
//+-----------------+------------------+
//        | name            | sn               |
//        +-----------------+------------------+
//        | 黑旋风李逵      | 09982            |
//        | 菩提老祖        | 00835            |
//        | 白素贞          | 00391            |
//        | 许仙            | 00031            |
//        | 不想毕业        | 00054            |
//        | 好好说话        | 51234            |
//        | tellme          | 83223            |
//        | 老外学中文      | 09527            |
//        | 1               | xuanfeng@qq.com  |
//        | 2               | NULL             |
//        | 3               | NULL             |
//        | 4               | xuxian@qq.com    |
//        | 5               | NULL             |
//        | 6               | say@qq.com       |
//        | 7               | NULL             |
//        | 8               | foreigner@qq.com |
//        +-----------------+------------------+
//        16 rows in set (0.00 sec)
//
//mysql>